<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var a = +prompt('请输入你要进行的操作；\n 1.存钱\n 2.取钱\n 3.显示余额\n 4.退出')
        var b = 100
        
        for (i=1 ; i <=99999;i++) {
            if (a === 1) {
          var c= +prompt('请输入存款金额')
              b= b+c
              alert(b)
              prompt('请输入你要进行的操作；\n 1.存钱\n 2.取钱\n 3.显示余额\n 4.退出')
        }else if (a === 2) {
            var c = +prompt('请输入取钱金额')
            b = b - c
            alert(b)
            prompt('请输入你要进行的操作；\n 1.存钱\n 2.取钱\n 3.显示余额\n 4.退出')
        }else if (a=== 3) {
            alert(b)
            prompt('请输入你要进行的操作；\n 1.存钱\n 2.取钱\n 3.显示余额\n 4.退出')
        }else {
            break
        }
        }
    </script>
</body>
</html>